{% extends 'org_base.html' %}
{% load staticfiles %}

{% block title %}
  机构课程
{% endblock %}

{% block right_form %}
  <div class="right companycenter layout">
    <div class="head">
      <h1>机构课程</h1>
    </div>
    <div class="brief group_list">
      {% for course in all_courses.object_list %}
        <div class="module1_5 box">
          <a class="comp-img-box" href="course-detail.html">

            <img width="214" height="195" src="{{ MEDIA_URL }}{{ course.image }}"/>
          </a>
          <div class="des">
            <a href="course-detail.html"><h2>{{ course.name }}</h2></a>
            <span class="fl">课时：<i class="key">{{ course.learn_times }}</i></span>
            <span class="fr">学习人数：{{ course.students }}</span>
          </div>
          <div class="bottom">
            <span class="fl">{{ course.course_org }}</span>
            <span class="star fr  notlogin" data-favid="13" data-fav-type="4">{{ course.fav_nums }}</span>
          </div>
        </div>
      {% endfor %}
    </div>
    <div class="pageturn">
            <ul class="pagelist">
              {% if all_courses.has_previous %}
                <li class="long"><a href="?{{ all_courses.previous_page_number.querystring }}">上一页</a></li>
              {% endif %}
              {% for page in all_courses.pages %}
                {% if page %}
                  {% ifequal page all_courses.number %}  {# 如果是当前页 #}
                    <li class="active"><a href="?{{ page.querystring }}">{{ page }}</a></li>
                  {% else %}
                    <li><a href="?{{ page.querystring }}" class="page">{{ page }}</a></li>
                  {% endifequal %}
                {% else %}
                  <li class="none">...</li>
                {% endif %}
              {% endfor %}
              {% if all_courses.has_next %} {# 如果是当前页 #}
                <li class="long"><a href="?{{ all_courses.next_page_number.querystring }}">下一页</a></li>
              {% endif %}

              {#              <li class="active"><a href="?page=1">1</a></li>#}
              {#              <li><a href="?page=2" class="page">2</a></li>#}
              {#              <li><a href="?page=3" class="page">3</a></li>#}
              {#              <li class="long"><a href="?page=2">下一页</a></li>#}
            </ul>
          </div>
  </div>
{% endblock %}

